interface Operations {
    double calculate(double a, double b);
}
class Addition implements Operations{
    @Override
    public double calculate(double a,double b){
        return a + b;
    }
}
class Subtraction implements Operations{
    @Override
    public double calculate(double a,double b){
        return a - b;
    }
}

public class Main {
    public static void main(String[] args) {

        Operations op = null;
        op= new Addition();
        System.out.println("加法: " + op.calculate(5, 3));
        op = new Subtraction();
        System.out.println("减法: " + op.calculate(5, 3));
    }
}
